package util.exceptions;

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.text.StringContent;

public abstract class FOCException extends Exception{
	/** For serialization. */
	private static final long serialVersionUID = 1L;
	/** The frame for which the error message appears over. */
	static JFrame frame = null;
	
	abstract public void showMessageDialog();
	
	protected final void showMessageDialog(String message, String title, int type){
		JOptionPane.showMessageDialog(frame,
		    message,
		    title,
		    type);
	}
	public static void setFrame(JFrame frame){
		FOCException.frame = frame;
	}

    public FOCException(String c) {
        super(c);
    }
    public FOCException() {
        super();
    }
}
